<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test page</title>
<link href="/css/jquery/w2ui-1.3.2.min.css" rel="stylesheet">
<script type="text/javascript" src="/js/jquery/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/js/jquery/w2ui-1.3.2.min.js"></script>
	<script type="text/javascript">
		function bbs(ss) {
			$.getJSON(ss,function(result){
				$("#msg").html(result);
			});
		}
		function bbp(ss,data) {
			$.post(ss,data,function(result){
				if(result.code) {
					w2confirm(result.message, result.title, function (btn) { });
				}else {
					var htm = "http://"+window.location.host+"/"+ss+"?{"+data+"}"+"<br/>";
					htm+=JSON.stringify(result);
			    	$("#msg").html(htm);
				}
			},"json");
		}
	</script>
</head>
<body>
	<br/>
	<input id="be"/> <button onclick="bbs($('#be').val())">get</button>
    <br/>
    <input id="be2"/> <input id="be3"/><button onclick="bbp($('#be2').val(),$('#be3').val())">post</button>
    <br/>
    <div id="msg"></div>
</body>
</html>